from tkinter import *

root = Tk()
root.title('Могоугольник')
root.geometry('300x250')

canvas = Canvas(bg = 'white', width = 250, height = 200)
canvas.pack(anchor=CENTER, expand = 1)
x=int(input("Введите координату Х начальной точки: "))
y=int(input("Введите координату Y начальной точки: "))
n=int(input("Введите коффициент увеличения: "))
if n==0 and 0<=x<=500 and 0<=y<=500: pass
elif n>0 and 0*n+x>=0 and 0*n+y>=0 and 30*n+x<=500 and 20*n+y<=500: pass
elif n<0 and 30*n+x>=0 and 20*n+y>=0 and 0*n+x<=500 and 0*n+y<=500: pass
else:
    print("Фигура превысила размеры поля")
    exit()



A = [10,0,10,10,20,10,20,0,30,0,30,20,0,20,0,0]

canvas.create_polygon( A[0]*n+x, A[1]*n+y,
                       A[2]*n+x, A[3]*n+y,
                       A[4]*n+x, A[5]*n+y,
                       A[6]*n+x, A[7]*n+y,
                       A[8]*n+x, A[9]*n+y,
                       A[10]*n+x, A[11]*n+y,
                       A[12]*n+x, A[13]*n+y,
                       A[14]*n+x, A[15]*n+y)
                                                                                                        
root.mainloop()
